#ifndef _INSTANTPROP_H_CSEAPI_
#define _INSTANTPROP_H_CSEAPI_

class CSE_IMPEXP_IN TIntProp
{
public:
    TIntObj value;

private:
    void *m_owner;
    TInt (*m_callback)(void *,TIntObj&,TInt *);

    TIntProp *operator&();     // get prop-value address disabled

public:
    TIntProp();
    ~TIntProp();

    void bindMethod(void *owner, void *AccessFunc);

    TIntProp& operator=(TInt i);
    operator TInt() const;

    TIntProp& operator++();         // prefix increment
    TIntProp& operator++(int);      // postfix increment
    TIntProp& operator--();         // prefix decrement
    TIntProp& operator--(int);      // postfix decrement

    void operator*=(TInt i);
    void operator/=(TInt i);
    void operator%=(TInt i);
    void operator+=(TInt i);
    void operator-=(TInt i);
    void operator<<=(TInt i);
    void operator>>=(TInt i);
    void operator&=(TInt i);
    void operator|=(TInt i);
    void operator^=(TInt i);
};

class CSE_IMPEXP_IN TWintProp
{
public:
    TWintObj value;

private:
    void *m_owner;
    TWint (*m_callback)(void *,TWintObj&,TWint *);

    TWintProp *operator&();     // get prop-value address disabled

public:
    TWintProp();
    ~TWintProp();

    void bindMethod(void *owner, void *AccessFunc);

    TWintProp& operator=(TWint i);
    operator TWint() const;

    TWintProp& operator++();          // prefix increment
    TWintProp& operator++(int);       // postfix increment
    TWintProp& operator--();          // prefix decrement
    TWintProp& operator--(int);       // postfix decrement

    void operator*=(TWint i);
    void operator/=(TWint i);
    void operator%=(TWint i);
    void operator+=(TWint i);
    void operator-=(TWint i);
    void operator<<=(TInt i);
    void operator>>=(TInt i);
    void operator&=(TWint i);
    void operator|=(TWint i);
    void operator^=(TWint i);
};

class CSE_IMPEXP_IN TFloatProp
{
public:
    TFloatObj value;

private:
    void *m_owner;
    TDouble (*m_callback)(void *,TFloatObj&,TDouble *);

    TFloatProp *operator&();     // get prop-value address disabled
    
public:
    TFloatProp();
    ~TFloatProp();

    void bindMethod(void *owner, void *AccessFunc);

    TFloatProp& operator=(TDouble f);
    operator TDouble() const;

    TFloatProp& operator++();          // prefix increment
    TFloatProp& operator++(int);       // postfix increment
    TFloatProp& operator--();          // prefix decrement
    TFloatProp& operator--(int);       // postfix decrement

    void operator*=(TDouble f);
    void operator/=(TDouble f);
    void operator+=(TDouble f);
    void operator-=(TDouble f);
};

class CSE_IMPEXP_IN TStringProp
{
public:
    TCharArray value;
    
private:
    void *m_owner;
    const TXchar* (*m_callback)(void *,TCharArray&,const TXchar**);

    TStringProp *operator&();     // get prop-value address disabled
    
public:
    TStringProp();
    ~TStringProp();

    void bindMethod(void *owner, void *AccessFunc);

    TStringProp& operator=(const TXchar *s);
    operator const TXchar*() const;
};

extern CSE_IMPEXP_IN TBool operator==(const TStringProp& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator==(const TStringProp& x, const TCharArray& y);
extern CSE_IMPEXP_IN TBool operator==(const TCharArray& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator==(const TStringProp& x, const TXchar *y);
extern CSE_IMPEXP_IN TBool operator==(const TXchar *x, const TStringProp& y);

extern CSE_IMPEXP_IN TBool operator!=(const TStringProp& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator!=(const TStringProp& x, const TCharArray& y);
extern CSE_IMPEXP_IN TBool operator!=(const TCharArray& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator!=(const TStringProp& x, const TXchar *y);
extern CSE_IMPEXP_IN TBool operator!=(const TXchar *x, const TStringProp& y);

extern CSE_IMPEXP_IN TBool operator>(const TStringProp& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator>(const TStringProp& x, const TCharArray& y);
extern CSE_IMPEXP_IN TBool operator>(const TCharArray& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator>(const TStringProp& x, const TXchar *y);
extern CSE_IMPEXP_IN TBool operator>(const TXchar *x, const TStringProp& y);

extern CSE_IMPEXP_IN TBool operator>=(const TStringProp& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator>=(const TStringProp& x, const TCharArray& y);
extern CSE_IMPEXP_IN TBool operator>=(const TCharArray& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator>=(const TStringProp& x, const TXchar *y);
extern CSE_IMPEXP_IN TBool operator>=(const TXchar *x, const TStringProp& y);

extern CSE_IMPEXP_IN TBool operator<(const TStringProp& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator<(const TStringProp& x, const TCharArray& y);
extern CSE_IMPEXP_IN TBool operator<(const TCharArray& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator<(const TStringProp& x, const TXchar *y);
extern CSE_IMPEXP_IN TBool operator<(const TXchar *x, const TStringProp& y);

extern CSE_IMPEXP_IN TBool operator<=(const TStringProp& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator<=(const TStringProp& x, const TCharArray& y);
extern CSE_IMPEXP_IN TBool operator<=(const TCharArray& x, const TStringProp& y);
extern CSE_IMPEXP_IN TBool operator<=(const TStringProp& x, const TXchar *y);
extern CSE_IMPEXP_IN TBool operator<=(const TXchar *x, const TStringProp& y);

#endif
